<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions">
    <ui:composition template="/layout/masterPageMain.xhtml">
         <f:metadata>
            
            <f:event type="preRenderView" listener="#{sys_NguoiDungController.onPageLoad_CheckAdmin_Edit()}">
                
            </f:event>
        </f:metadata>
         <ui:define name="ui-header">
             <title>TẠO TÀI KHOẢN</title>
        </ui:define>

        <ui:define name="ui-content">
            <div class="container content">
                <div class="row">
                    <div class="col-md-12">
                        <div class="row margin-bottom-40">
                            <div class="col-md-12">
                                <!-- Reg-Form -->
                                <h:form class="sky-form" id="sky-form">
                                    <p:growl id="growl" showDetail="true" sticky="true" escape="false"  />  
                                    <header>TẠO TÀI KHOẢN ADMIN</header>

                                    <fieldset>     
                                        <div class="col-md-3">
                                            <section>
                                                <label class="input">
                                                    <i class="icon-append fa fa-user"><span style="color: red;">*</span></i>
                                                    <p:inputText id="txtUserID" placeholder="Tên tài khoản" value="#{sys_NguoiDungController.item.userID}"></p:inputText>
                                                    <p:message for="txtUserID" />
                                                    <b class="tooltip tooltip-bottom-right">Nhập tên tài khoản: trường này buộc phải nhập</b>
                                                </label>
                                            </section>

                                            <section>
                                                <label class="input">
                                                    <i class="icon-append fa fa-lock"><span style="color: red;">*</span></i>
                                                    <p:password placeholder="Mật khẩu" value="#{sys_NguoiDungController.item.password}"></p:password>

                                                      <b class="tooltip tooltip-bottom-right">Nhập mật khẩu</b>
                                                </label>
                                            </section>

                                            <section>
                                                <label class="input">
                                                    <i class="icon-append fa fa-lock"><span style="color: red;">*</span></i>
                                                    <p:password  placeholder="Nhập lại mật khẩu" value="#{sys_NguoiDungController.nhapLaiMatKhau}"></p:password>

                                                     <b class="tooltip tooltip-bottom-right">Nhập lại mật khẩu</b>
                                                </label>
                                            </section>
                                             
                                             <section>
                                                <label class="input">
                                                    <i class="icon-append fa fa-user"></i>
                                                    <p:inputText id="txtDescr" placeholder="Diễn giải" value="#{sys_NguoiDungController.item.descr}"></p:inputText>
                                                    <p:message for="txtUserID" />
                                                    <b class="tooltip tooltip-bottom-right">Diễn giải</b>
                                                </label>
                                            </section>
                                        </div>
                                        <div class="col-md-3">
                                            <section>
                                                <label class="checkbox">
                                                   <c:choose>
                                                       <c:when test="#{sys_NguoiDungController.item.editInfo}">
                                                            <input type="checkbox"  id="cbEditInfo" checked="#{sys_NguoiDungController.item.editInfo}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbEditInfo" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>
                                                    Edit info
                                                </label>
                                                <label class="checkbox">
                                                    <c:choose>
                                                        <c:when test="#{sys_NguoiDungController.item.thongKeTK}">
                                                            <input type="checkbox" id="cbthongKeTK" checked="#{sys_NguoiDungController.item.thongKeTK}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbthongKeTK" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>

                                                    Thống kê tài khoản
                                                </label>
                                                <label class="checkbox">
                                                    <c:choose>
                                                        <c:when test="#{sys_NguoiDungController.item.tkDoanhThu}">
                                                            <input type="checkbox" id="cbtkDoanhThu" checked="#{sys_NguoiDungController.item.tkDoanhThu}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbtkDoanhThu" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>

                                                    Thống kê doanh thu
                                                </label>
                                                <section style="padding-left: 30px;">
                                                    <label class="checkbox">
                                                        <c:choose>
                                                            <c:when test="#{sys_NguoiDungController.item.tKNapTien}">
                                                                <input type="checkbox" id="cbTKNapTien" checked="#{sys_NguoiDungController.item.tKNapTien}"/><i></i>
                                                            </c:when>
                                                            <c:otherwise>
                                                                <input type="checkbox" id="cbTKNapTien" /><i></i>
                                                            </c:otherwise>
                                                        </c:choose>

                                                        Tổng tiền nạp
                                                    </label>
                                                     <label class="checkbox">
                                                        <c:choose>
                                                            <c:when test="#{sys_NguoiDungController.item.tongCashOut}">
                                                                <input type="checkbox" id="cbTongCashout" checked="#{sys_NguoiDungController.item.tongCashOut}"/><i></i>
                                                            </c:when>
                                                            <c:otherwise>
                                                                <input type="checkbox" id="cbTongCashout" /><i></i>
                                                            </c:otherwise>
                                                        </c:choose>

                                                        Tổng cashout
                                                    </label>
                                                     <label class="checkbox">
                                                        <c:choose>
                                                            <c:when test="#{sys_NguoiDungController.item.thongKeDoanhThu}">
                                                                <input type="checkbox" id="cbThongKeDoanhThu" checked="#{sys_NguoiDungController.item.thongKeDoanhThu}"/><i></i>
                                                            </c:when>
                                                            <c:otherwise>
                                                                <input type="checkbox" id="cbThongKeDoanhThu" /><i></i>
                                                            </c:otherwise>
                                                        </c:choose>

                                                        Thống kê doanh thu
                                                    </label>
                                                    <section style="padding-left: 30px;">
                                                        <label class="checkbox">
                                                          <c:choose>
                                                              <c:when test="#{sys_NguoiDungController.item.thongKeDoanhThuBit}">
                                                                  <input type="checkbox" id="cbThongKeDoanhThuBit" checked="#{sys_NguoiDungController.item.thongKeDoanhThuBit}"/><i></i>
                                                              </c:when>
                                                              <c:otherwise>
                                                                  <input type="checkbox" id="cbThongKeDoanhThuBit" /><i></i>
                                                              </c:otherwise>
                                                          </c:choose>
                                                          BIT
                                                      </label>
                                                      <label class="checkbox">
                                                          <c:choose>
                                                              <c:when test="#{sys_NguoiDungController.item.thongKeDoanhThuBac}">
                                                                  <input type="checkbox" id="cbThongKeDoanhThuBac" checked="#{sys_NguoiDungController.item.thongKeDoanhThuBac}"/><i></i>
                                                              </c:when>
                                                              <c:otherwise>
                                                                  <input type="checkbox" id="cbThongKeDoanhThuBac" /><i></i>
                                                              </c:otherwise>
                                                          </c:choose>
                                                          BẠC
                                                      </label>
                                                        <label class="checkbox">
                                                          <c:choose>
                                                              <c:when test="#{sys_NguoiDungController.item.doanhThu}">
                                                                  <input type="checkbox" id="cbDoanhThu" checked="#{sys_NguoiDungController.item.doanhThu}"/><i></i>
                                                              </c:when>
                                                              <c:otherwise>
                                                                  <input type="checkbox" id="cbDoanhThu" /><i></i>
                                                              </c:otherwise>
                                                          </c:choose>
                                                          Doanh thu
                                                      </label>
                                                    </section>
                                                </section>
                                                <label class="checkbox">
                                                    <c:choose>
                                                        <c:when test="#{sys_NguoiDungController.item.thongKeTheoGame}">
                                                            <input type="checkbox" id="cbThongKeTheoGame" checked="#{sys_NguoiDungController.item.thongKeTheoGame}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbThongKeTheoGame" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>
                                                    Thống kê doanh thu theo game
                                                </label>
                                                <label class="checkbox">
                                                    <c:choose>
                                                        <c:when test="#{sys_NguoiDungController.item.thongKeKhac}">
                                                            <input type="checkbox" id="cbThongKeKhac" checked="#{sys_NguoiDungController.item.thongKeKhac}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbThongKeKhac" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>
                                                    Thống kê khác
                                                </label>
                                                <section style="padding-left: 30px;">
                                                     <label class="checkbox">
                                                        <c:choose>
                                                            <c:when test="#{sys_NguoiDungController.item.tongBit}">
                                                                <input type="checkbox" id="cbTongBit" checked="#{sys_NguoiDungController.item.tongBit}"/><i></i>
                                                            </c:when>
                                                            <c:otherwise>
                                                                <input type="checkbox" id="cbTongBit" /><i></i>
                                                            </c:otherwise>
                                                        </c:choose>
                                                        Tổng BIT
                                                    </label>
                                                     <label class="checkbox">
                                                        <c:choose>
                                                            <c:when test="#{sys_NguoiDungController.item.tongBac}">
                                                                <input type="checkbox" id="cbTongBac" checked="#{sys_NguoiDungController.item.tongBac}"/><i></i>
                                                            </c:when>
                                                            <c:otherwise>
                                                                <input type="checkbox" id="cbTongBac" /><i></i>
                                                            </c:otherwise>
                                                        </c:choose>
                                                        Tổng BẠC
                                                    </label>
                                                </section>
                                            </section>
                                         </div>
                                        <div class="col-md-3" hidden="true">
                                              <section>
                                                <label class="checkbox">
                                                   <c:choose>
                                                       <c:when test="#{sys_NguoiDungController.item.epay}">
                                                            <input type="checkbox"  id="cbEpay" checked="#{sys_NguoiDungController.item.epay}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbEpay" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>
                                                    Epay
                                                </label>
                                                <label class="checkbox">
                                                    <c:choose>
                                                        <c:when test="#{sys_NguoiDungController.item.nganLuong}">
                                                            <input type="checkbox" id="cbNganLuong" checked="#{sys_NguoiDungController.item.nganLuong}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbNganLuong" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>
                                                    Ngân lương
                                                </label>
                                                
                                            </section>
                                        </div>
                                        <div class="col-md-3">
                                             <section>
                                                <label class="checkbox">
                                                   <c:choose>
                                                        <c:when test="#{sys_NguoiDungController.item.isGame1}">
                                                            <input type="checkbox"  id="cbGame1" checked="#{sys_NguoiDungController.item.isGame1}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbGame1" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>
                                                    Game 1
                                                </label>
                                                <label class="checkbox">
                                                    <c:choose>
                                                        <c:when test="#{sys_NguoiDungController.item.isGame2}">
                                                            <input type="checkbox" id="cbGame2" checked="#{sys_NguoiDungController.item.isGame2}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbGame2" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>
                                                    Game 2
                                                </label>
                                                <label class="checkbox">
                                                    <c:choose>
                                                        <c:when test="#{sys_NguoiDungController.item.isGame3}">
                                                            <input type="checkbox" id="cbGame3" checked="#{sys_NguoiDungController.item.isGame3}"/><i></i>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <input type="checkbox" id="cbGame3" /><i></i>
                                                        </c:otherwise>
                                                    </c:choose>

                                                    Game 3
                                                </label>
                                            </section>
                                        </div>
                                        
                                      
                                    </fieldset>
                                    <footer>
                                        <button class="btn-u" type="button" onclick="Save_User_Click(true);">Lưu</button>
                                        <button class="btn-u" type="button" onclick="ThoatUser();">Thoát</button>
                                        <p:remoteCommand name="Save_Users"  actionListener="#{sys_NguoiDungController.btnSave_Click}" update=":sky-form"></p:remoteCommand>
                                        <p:remoteCommand name="cmd_Thoat"  actionListener="#{sys_NguoiDungController.btnCancel_Click}" update=":sky-form"></p:remoteCommand>
                                    </footer>
                            </h:form>
                            <!-- End Reg-Form -->
                            </div>
                        </div>
            </div>
                    </div>
                </div>

        </ui:define>
    </ui:composition> 
</html>